package book;

public class Book {
    private String name;//书名
    private int price;//价格
    private String autor;//作者
    private String type;//书的类型
    private boolean borrowed;//书是否被借出

    public Book(String name,int price,String autor,String type) {
        this.name = name;
        this.autor=autor;
        this.price=price;
        this.type=type;
    }

    public void setBorrowed(boolean borrowed) {
        this.borrowed = borrowed;
    }

    public String getName() {
        return name;
    }

    public int getPrice() {
        return price;
    }

    public String getAutor() {
        return autor;
    }

    public boolean isBorrowed() {
        return borrowed;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", price=" + price +
                ", autor='" + autor + '\'' +
                ", type='" + type + '\'' +
                ", borrowed=" + borrowed +
                '}';
    }
}
